package com.example.chat.repository;

import com.example.chat.model.MessageTemplate;
import com.example.chat.type.MessageType;
import com.example.chat.type.PushMessageSystem;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface MessageTemplateRepository extends JpaRepository<MessageTemplate, String> {

    /**
     *
     * @param pushMessageSystem
     * @param messageType
     */
    MessageTemplate findTop1ByPushMessageSystemAndMessageType(PushMessageSystem pushMessageSystem, MessageType messageType);

    /**
     * @description:
     * @date 2022/7/13 15:09
     */
    List<MessageTemplate> findAllByIdIn(List<String> ids);
}